package com.wjj.ndkdemo;

public class JniTester {
    // Used to load the 'ndktest2' library on application startup.
    static {
        System.loadLibrary("ndktest2");
    }

    /**
     * Java 将数据传递到 native 中
     */
    public native String testBaseType(int i, long l, float f, double d, boolean b, String s);

    public native String testArray(int[] arrInt, String[] arrString );

    /**
     * 测试类
     */
    public native String testObjectType(TestBean testBean);

    public native TestBean testNewTestBean();

    /**
     * 测试异常处理
     */
    public native void testException() throws Exception;

    /**
     * 测试jni线程
     */
    public native void testThread();

    public void throwsException(){
        throw new NullPointerException("java生成的异常");
    }
}
